package com.hupu.jrs.ui.content

import com.hupu.jrs.ui.BasePresenter
import com.hupu.jrs.ui.BaseView

/**
 * Created by sll on 2016/5/25.
 */
interface ContentPagerContract {

    interface View : BaseView {

        fun showLoading()

        fun hideLoading()

        fun onError()

        fun sendMessageToJS(handlerName: String, `object`: Any)

        fun loadUrl(url: String)

        fun showReplyUi(fid: String, tid: String, pid: String, title: String)

        fun showReportUi(tid: String, pid: String)

        fun showBrowserUi(url: String)

        fun showContentUi(tid: String, pid: String, page: Int)

        fun showThreadListUi(fid: String)

        fun showUserProfileUi(uid: String)

        fun showLoginUi()

        fun onClose()
    }

    interface Presenter : BasePresenter<View> {

        val javaScriptInterface: ContentPagerPresenter.HupuBridge

        fun onThreadInfoReceive(tid: String, fid: String, pid: String, page: Int)

        fun onReply(area: Int, index: Int)

        fun onReport(area: Int, index: Int)

        fun addLight(area: Int, index: Int)

        fun addRuLight(area: Int, index: Int)

        fun handlerUrl(url: String)

        fun onReload()
    }
}
